import {createStore} from 'vuex'

export default createStore({
  state: {

    perms: [],  // 权限
    nick: '',   // 昵称
    avatar: ''  // 头像

  },
  getters: {},
  mutations: {
    setPerms(state, perms) {
      state.perms = perms
    },
    setNick(state, nick) {
      state.nick = nick
    },
    setAvatar(state, avatar) {
      state.avatar = avatar
    },
    resetState(state) {
      state.perms = []
      state.nick = ''
      state.avatar = ''
    }
  },
  actions: {},
  modules: {}
})
